package Shop.tools;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * Created by BadHuge on 2020/9/23.
 */
public class OrdersTools {
        private static String getNowDate(){
            Date date = new Date();
            SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMddHHmmss");
            return simpleDateFormat.format(date);
        }
        private static String getRandom(){
            String rand = "";
            for (int i = 0;i < 8;i++){
                rand = rand + (int)(Math.random()*10);
            }
            return rand;
        }

        public static String createOrderCode(){
            return getRandom();
        }
    }

